]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
[StBoxLayout] Add st_box_layout_get_n_children
authorColin Walters <walters@verbum.org>
Tue, 10 Nov 2009 20:46:30 +0000 (15:46 -0500)
committerColin Walters <walters@verbum.org>
Thu, 12 Nov 2009 16:42:00 +0000 (11:42 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=600734

src/st/st-box-layout.c
src/st/st-box-layout.h

index d0371d821bacdccbb06f6519064ca6cf088a09fb..8885f6a937ad5bb4d625f25658044ef92c89234d 100644 (file)
@@ -1385,3 +1385,15 @@ st_box_layout_destroy_children (StBoxLayout *self)
 {
   st_box_layout_internal_remove_all (self, TRUE);
 }
+
+/**
+ * st_box_layout_get_n_children:
+ * @self: a #StBoxLayout
+ *
+ * Returns the number of children in this box.
+ */
+guint
+st_box_layout_get_n_children  (StBoxLayout *self)
+{
+  return g_list_length (self->priv->children);
+}
index b57143ba44c2330f25c98e51a9d94af4e61a5a53..21cd0b757ea7c6675264e2e68388bf5b5c8ef3ba 100644 (file)
@@ -93,6 +93,8 @@ void     st_box_layout_remove_all     (StBoxLayout *box);
 
 void     st_box_layout_destroy_children (StBoxLayout *box);
 
+guint    st_box_layout_get_n_children  (StBoxLayout *box);
+
 G_END_DECLS
 
 #endif /* _ST_BOX_LAYOUT_H */